
var baseSize = 100;
var baseWidth = 750;
var sWidth;
var rootEl;

function screenChange() {
    sWidth = window.screen.width;
    rootEl = document.documentElement;
    if (sWidth && rootEl) {
        if (sWidth > baseWidth) {
            rootEl.style.fontSize = "100px";
        } else {
            rootEl.style.fontSize = `${(sWidth * baseSize) / baseWidth}px`;
        }
    } else if (rootEl) {
        rootEl.style.fontSize = `${baseSize}px`;
    }
}
screenChange();
window.addEventListener("resize", () => {
    screenChange();
});